package com.gu.mobileweb.controller;

import com.gu.mobileweb.model.IndexEat;
import com.gu.mobileweb.service.IndexEatService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/home/eat")
public class IndexEatController {
    @Autowired
    private IndexEatService indexEatService;

    @GetMapping("/list")
    public List<IndexEat> eatSwiperList(){
        return indexEatService.eatSwiperList();
    }

    @GetMapping("/foodList")
    public List<IndexEat> foodList() {
        return indexEatService.foodList();
    }

    @GetMapping("/specialitesList")
    public List<IndexEat> specialitesList() {
        return indexEatService.specialitesList();
    }
}
